package com.hs.guava;

import com.google.common.util.concurrent.RateLimiter;

/**
 * @Author: hs
 * @Description:
 * @Date: Create in 10:51 2019/8/28
 */
public class RateLimiterTest {
    public static void main(String[] args) {
        RateLimiter rateLimiter = RateLimiter.create(3);
        for(int i=0;i<100;i++){
            rateLimiter.acquire();
            System.out.println(i);
        }
    }
}
